<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>全流程造数据2</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/1.9.0/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/1.9.0/themes/icon.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.9.0/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.9.0/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/easyui/1.9.0/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/common/cxValidatebox.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/common/jquery.form.js"></script>

    <script>


        /**
         *  流程复选框 -- start
         */

        //是否启用验证
        function isValitateTr(trNum, isValitate){
            var temp;
            if(isValitate){
                temp = "enableValidation";
            }
            else{
                temp = "disableValidation";
            }
            //"发标"行校验
            if(trNum == 1) {
                //借款人手机号
                $("#borrowerPhone").textbox(temp);
                $("#tenderTitle").textbox(temp);
                $("#tenderAmount").textbox(temp);
                $("#tenderInterestrate").textbox(temp);
                $("#ccRepaymentType").combobox(temp);
                $("#ccTenderPhases").combobox(temp);
                //首次贷借款目的/二次贷借款目的
                var borrowTimeVal = $("input[name='borrowTime']:checked").val();
                // alert(borrowTimeVal);
                if(borrowTimeVal == "1"){
                    isValidateBorrowTime(1,isValitate);
                }
                else if(borrowTimeVal == "2"){
                    isValidateBorrowTime(2,isValitate);
                }
            }
            //"发布产品、购买"行校验
            else if(trNum == 2){
                $("#ccProductType").combobox(temp);
                $("#investorPhone").textbox(temp);
            }
            //"确认借贷"行校验
            else if(trNum == 4){
                $("#loanSource").combobox(temp);
            }

        }

        //所有行启用或禁用校验
        function isValidateAllTr(isValidate){
            isValitateTr(1, isValidate);
            isValitateTr(2, isValidate);
            isValitateTr(4, isValidate);
        }

        //初始化，禁用所有行校验
        $(function () {
            isValidateAllTr(false);
        });

        //点击全选复选框勾选所有复选框，并显示所有tr
        //点击取消全选复选框取消勾选所有复选框，并隐藏所有tr
        $(function(){
            $("#allAndNotAll").click(function () {
                if($(this).prop("checked")){
                    $("input[name=items]:checkbox").prop("checked",true);
                    //显示所有行
                    isShowAllTr(true);
                    //启用所有行校验
                    isValidateAllTr(true);
                    //隐藏所有TenderId行
                    hideTenderIdTr(1,true);
                    disableTenderId(1,true);
                }else{
                    $("input[name=items]:checkbox").prop("checked",false);
                    //隐藏所有行
                    isShowAllTr(false);
                    //禁用所有行校验
                    isValidateAllTr(false);
                    //隐藏所有TenderId行
                    hideTenderIdTr(1,true);
                    disableTenderId(1,true);
                }

            });
        });

        //勾选规则：
        //1.如果已勾选的只有一个，则直接显示
        //2.如果已勾选的个数大于一个，则获取最小值、最大值；将最小值至最大值都勾选
        //3.如果已选中的等于所有复选框的个数，则勾选全选复选框
        //取消勾选规则：
        //1.如果取消勾选时只有当前项，则当前项取消
        //2.如果当前项大于最小值，则当前项及后项一并取消勾选
        //3.如果全选被勾选，则全选取消勾选
        $(function(){
            $("[name=items]:checkbox").click(function () {

                var checkboxLength = $("input[name='items']").length;
                // alert(checkboxLength);

                //选中/取消勾选复选框的value
                var checkboxValue = $(this).val();
                // alert(checkboxValue);
                var isCheck = $(this).prop("checked");
                // alert(isCheck);

                //获取选中的个数
                var checkboxCheckedLength = $("input[name='items']:checked").length;
                // alert(checkboxCheckedLength);

                //勾选
                if(isCheck == true){

                    //如果已勾选的只有一个，则直接显示
                    if(checkboxCheckedLength == 1){
                        //当前项勾选
                        $("input[value=" + checkboxValue + "]:checkbox").prop("checked", true);
                        //当前项对相应的行显示
                        $("#" + checkboxValue).show();
                        //显示tenderId行，及验证
                        hideTenderIdTr(checkboxValue, true);
                        disableTenderId(checkboxValue, true);
                        //启用当前项包含的控件验证
                        isValitateTr(checkboxValue, true);
                        //显示提交按钮
                        $("#trSubmitButton").show();
                    }
                    //如果已勾选的个数大于一个，则获取最小值、最大值；将最小值至最大值都勾选
                    else if(checkboxCheckedLength > 1 && checkboxCheckedLength <= checkboxLength){
                        var checkboxCheckedArray = [];
                        //获取所有选中的复选框的值
                        $("input[name='items']:checked").each(function () {
                            checkboxCheckedArray.push($(this).val());
                        })
                        var max = Math.max.apply(null,checkboxCheckedArray);
                        var min = Math.min.apply(null,checkboxCheckedArray);
                        // alert("min:" + min);
                        // alert("max:" + max);

                        for (var i = min; i <= max; i++) {
                            $("input[value=" + i + "]:checkbox").prop("checked", true);
                            $("#" + i).show();
                            // alert("i:" + i);
                            //启用验证
                            isValitateTr(i, true);
                        }
                        //显示tenderId行，及验证
                        hideTenderIdTr(min, true);
                        disableTenderId(min,true)
                    }
                    //重新获取已选中已勾选的个数
                    checkboxCheckedLength = $("input[name='items']:checked").length;
                    //如果已选中的等于所有复选框的个数，则勾选全选复选框
                    if (checkboxLength == checkboxCheckedLength) {
                        $("#allAndNotAll").prop("checked", true);
                    }

                }
                //取消勾选
                else{
                    //获取选中的个数
                    // var checkboxCheckedLength = $("input[name='items']:checked").length;
                    // alert(checkboxCheckedLength);

                    //如果取消勾选时只有当前项，则当前项取消
                    if(checkboxCheckedLength == 0){
                        $("input[value=" + checkboxValue + "]:checkbox").prop("checked", false);
                        $("#" + checkboxValue).hide();
                        //隐藏提交按钮
                        $("#trSubmitButton").hide();
                        // hideTenderIdTr(1);
                        //禁用验证
                        isValitateTr(checkboxValue, false);

                    }else{

                        var checkboxCheckedArray = [];
                        //获取所有选中的复选框的值
                        $("input[name='items']:checked").each(function () {
                            checkboxCheckedArray.push($(this).val());
                        })
                        //添加取消勾选的值
                        checkboxCheckedArray.push(checkboxValue);
                        var min = Math.min.apply(null,checkboxCheckedArray);
                        // alert("取消勾选，最小值：" + min);
                        // alert("取消勾选，当前值：" + checkboxValue);

                        //如果当前项为最小项，则只取消勾选当前项
                        if(min == checkboxValue){
                            $("input[value=" + checkboxValue + "]:checkbox").prop("checked", false);
                            $("#" + checkboxValue).hide();
                            // alert("取消勾选，checkboxValue：" + checkboxValue);
                            hideTenderIdTr(checkboxValue, false);
                            disableTenderId(checkboxValue,false)
                            isValitateTr(checkboxValue,false)
                        }
                        //如果当前项大于最小值，则当前项及后项都取消勾选
                        else if(checkboxValue > min){
                            for(var i = checkboxValue; i <= checkboxLength; i++){
                                $("input[value=" + i + "]:checkbox").prop("checked",false);
                                $("#" + i).hide();
                                // alert("取消勾选，i:" + i);
                                //禁用验证
                                isValitateTr(i, false);
                            }
                            // hideTenderIdTr(1);
                        }

                        //获取全选选中状态
                        var isAllAndNotAllCheck = $("#allAndNotAll").prop("checked");
                        //如果选中，则取消勾选
                        if(isAllAndNotAllCheck){
                            $("#allAndNotAll").prop("checked",false);
                        }
                    }

                }
            });
        });


        //显示/隐藏行
        function isShowAllTr(isShow) {
            if (isShow) {
                $("#1").show();
                $("#2").show();
                $("#3").show();
                $("#4").show();
                $("#5").show();
                $("#6").show();
                $("#7").show();
                $("#trSubmitButton").show();
            }
            else{
                $("#1").hide();
                $("#2").hide();
                $("#3").hide();
                $("#4").hide();
                $("#5").hide();
                $("#6").hide();
                $("#7").hide();
                $("#trSubmitButton").hide();
            }
        }

        //隐藏 tenderId行
        function hideTenderIdTr(num, isCheck){

            if(!isCheck){
                num = parseInt(num) + 1;
            }

            // alert("num:" + num);
            $("#trProductTenderIdList").hide();
            $("#trTenderFullTenderIdList").hide();
            $("#trUserEnsureOwnTenderTenderIdList").hide();
            $("#trTenderFinalCheckTenderIdList").hide();
            $("#trRepaySecParentTenderIdList").hide();
            $("#trProductId").hide();

            if(num == 1){
                // $("#trProductTenderIdList").hide();
                // $("#trTenderFullTenderIdList").hide();
                // $("#trUserEnsureOwnTenderTenderIdList").hide();
                // $("#trTenderFinalCheckTenderIdList").hide();
                // $("#trRepaySecParentTenderIdList").hide();
                // $("#trProductId").hide();
                ;
            }else if(num == 2){
                $("#trProductTenderIdList").show();
            }else if(num == 3){
                $("#trTenderFullTenderIdList").show();
            }else if(num == 4){
                $("#trUserEnsureOwnTenderTenderIdList").show();
            }else if(num == 5){
                $("#trTenderFinalCheckTenderIdList").show();
            }else if(num == 6){
                $("#trRepaySecParentTenderIdList").show();
            }else if(num == 7){
                $("#trProductId").show();
            }

        }
        //禁用tenderId校验
        function disableTenderId(num, isCheck){
            if(!isCheck){
                num = parseInt(num) + 1;
            }

            // alert("num:" + num);
            $("#productTenderIdList").textbox('disableValidation');
            $("#tenderFullTenderIdList").textbox('disableValidation');
            $("#userEnsureOwnTenderTenderIdList").textbox('disableValidation');
            $("#tenderFinalCheckTenderIdList").textbox('disableValidation');
            $("#repaySecParentTenderIdList").textbox('disableValidation');
            $("#interestProductIdList").textbox('disableValidation');
            if(num == 1){
                ;
            }else if(num == 2){
                $("#productTenderIdList").textbox('enableValidation');
            }else if(num == 3){
                $("#tenderFullTenderIdList").textbox('enableValidation');
            }else if(num == 4){
                $("#userEnsureOwnTenderTenderIdList").textbox('enableValidation');
            }else if(num == 5){
                $("#tenderFinalCheckTenderIdList").textbox('enableValidation');
            }else if(num == 6){
                $("#repaySecParentTenderIdList").textbox('enableValidation');
            }else if(num == 7){
                $("#interestProductIdList").textbox('enableValidation');
            }
        }
        //初始化，禁用tenderId校验
        $(function () {
            disableTenderId(1, true);
        })

        /**
         *  流程复选框 -- end
         */


        /**
         *  借贷次数单选按钮 -- start
         */
        $(function(){
            $("input[name='borrowTime']").click(function(){
                //获取借款次数的value
                var borrowTimeVal = $("input[name='borrowTime']:checked").val();
                //如果是首次贷，则隐藏“二次贷类型”，“二次贷借款目的”，“二次贷是否借新还旧”；显示“首次贷借款目的”
                if(borrowTimeVal == "1"){
                    isShowBorrowTime(1,true);
                    isValidateBorrowTime(1,true);
                }
                //否则是二次贷，则显示“二次贷类型”，“二次贷借款目的”，“二次贷是否借新还旧”；隐藏“首次贷借款目的”
                else if(borrowTimeVal == "2"){
                    isShowBorrowTime(2,true);
                    isValidateBorrowTime(2,true);
                }
            });
        });


        //显示首次贷/二次贷控件
        function isShowBorrowTime(borrowTime,isShow){
            if(isShow){
                if(borrowTime == 1){
                    $("#trPurposeOfBorrowing").show();
                    $("#trSecType").hide();
                    $("#trSecPurposeOfBorrowing").hide();
                    $("#trJieXinHuanJiu").hide();
                }
                else if(borrowTime == 2){
                    $("#trPurposeOfBorrowing").hide();
                    $("#trSecType").show();
                    $("#trSecPurposeOfBorrowing").show();
                    $("#trJieXinHuanJiu").show();
                }
            }

        }

        //验证首次贷/二次贷控件
        function isValidateBorrowTime(borrowTime,isValidate){
            //启用验证
            if(isValidate){
                //启用首次贷验证，并禁用二次贷验证
                if(borrowTime == 1){
                    $("#purposeOfBorrowing").combobox('enableValidation');
                    $("#secType").combobox('disableValidation');
                    $("#secPurposeOfBorrowing").combobox('disableValidation');
                    $("#isJieXinHuanJiu").combobox('disableValidation');
                }
                //禁用首次贷验证，并启用二次贷验证
                else if(borrowTime == 2){
                    $("#purposeOfBorrowing").combobox('disableValidation');
                    $("#secType").combobox('enableValidation');
                    $("#secPurposeOfBorrowing").combobox('enableValidation');
                    $("#isJieXinHuanJiu").combobox('enableValidation');
                }
            }
            //禁止验证
            else{
                //禁止首次贷验证
                if(borrowTime == 1){
                    $("#purposeOfBorrowing").combobox('disableValidation');
                }
                //禁止二次贷验证
                else if(borrowTime == 2){
                    $("#secType").combobox('disableValidation');
                    $("#secPurposeOfBorrowing").combobox('disableValidation');
                    $("#isJieXinHuanJiu").combobox('disableValidation');
                }
                //禁止首次贷，二次贷验证
                else if(borrowTime == 0){
                    $("#purposeOfBorrowing").combobox('disableValidation');
                    $("#secType").combobox('disableValidation');
                    $("#secPurposeOfBorrowing").combobox('disableValidation');
                    $("#isJieXinHuanJiu").combobox('disableValidation');
                }

            }

        }

        //默认禁用首次贷、二次贷控件验证
        $(function () {
            isValidateBorrowTime(0,false);
        })

        /**
         *  借贷次数单选按钮 -- end
         */


        /**
         *  标的类型单选按钮 -- start
         */


        //产业集群企业名称 启用/禁用验证
        function tbEnterpriseNameIsValidate(isValidate){
            if(isValidate){
                $("#enterpriseName").textbox('enableValidation');
            }else{
                $("#enterpriseName").textbox('disableValidation');
                // $("#enterpriseName").textbox({disabled:true});//加上这句，前台将不传这个字段（不知道是否需要加，还是后台判断）
            }
        }

        //初始化，禁用验证（产业集群名称）
        $(function(){
            tbEnterpriseNameIsValidate(false);
        });

        /**
         * 单击“标的类型”触发事件
         * 1.隐藏C+相关，及产业集群
         * 2.根据标类型，初始化“借款期限”，“还款方式”
         */
        $(function(){
            $("input[name='tenderType']").click(function(){

                //隐藏C+相关，及产业集群
                if($("#trCreditProductType").show() || $("#trCreditPromotion").show() || $("#trEnterpriseName").show()){
                    $("#trCreditProductType").hide();
                    $("#trCreditPromotion").hide();
                    $("#trEnterpriseName").hide();
                    tbEnterpriseNameIsValidate(false);
                }

                //借款期限
                var tenderPhasesData;
                var tenderPhasesData1 = [{text:"请选择",value:"-1"},{text:"1月",value:"1"},{text:"2月",value:"2"}];
                var tenderPhasesData2 = [{text:"请选择",value:"-1"},{text:"3月",value:"3"},{text:"6月",value:"6"}];
                var tenderPhasesData3 = [{text:"请选择",value:"-1"},{text:"3月",value:"3"},{text:"6月",value:"6"},{text:"9月",value:"9"}];

                //还款方式
                var repaymentTypeData;
                var repaymentTypeData1 = [{text:"请选择",value:"-1"},{text:"等额本金",value:"1"},{text:"等额本息",value:"2"}];
                var repaymentTypeData2 = [{text:"请选择",value:"-1"},{text:"还本付息",value:"3"},{text:"等额等息",value:"6"}];
                var repaymentTypeData3 = [{text:"请选择",value:"-1"},{text:"还本付息",value:"3"},{text:"等额等息",value:"6"},{text:"等本等息",value:"7"}];

                //获取单选按钮的值
                var radiobtnVal = $("input[name='tenderType']:checked").val();
                // alert(radiobtnVal);
                //清空下拉列表的值
                // $("#ccTenderPhases").combobox('clear');

                //修改借款期限的值
                if(radiobtnVal == '24'){
                    tenderPhasesData = tenderPhasesData1;
                    repaymentTypeData = repaymentTypeData1;
                }else if(radiobtnVal == '25'){
                    tenderPhasesData = tenderPhasesData2;
                    repaymentTypeData = repaymentTypeData2;
                }else if(radiobtnVal == '31'){
                    tenderPhasesData = tenderPhasesData3;
                    repaymentTypeData = repaymentTypeData3;
                }
                else if(radiobtnVal == '37'){
                    tenderPhasesData = tenderPhasesData3;
                    repaymentTypeData = repaymentTypeData3;
                    $("#creditProductType").textbox('setValue','PP');
                    $("#creditPromotion").textbox('setValue','34');
                    $("#trCreditProductType").show();
                    $("#trCreditPromotion").show();
                }
                else if(radiobtnVal == '32'){
                    tenderPhasesData = tenderPhasesData3;
                    $("#enterpriseName").textbox('setValue','金创-普通');
                    $("#trEnterpriseName").show();
                    tbEnterpriseNameIsValidate(true);
                }
                //加载借款期限
                $("#ccTenderPhases").combobox({
                    data:tenderPhasesData
                });
                //加载还款方式
                $("#ccRepaymentType").combobox({
                    data:repaymentTypeData
                });

            });
        });

        /**
         *  标的类型单选按钮 -- end
         */


        /**
         * “芝麻开花”封闭期 -- start
         */

        //产品封闭期 禁用验证
        function ccPeriodCloseIsValidate(isValidate){
            if(isValidate) {
                $("#ccPeriodClose").combobox("enableValidation");
            }
            else{
                $("#ccPeriodClose").combobox('disableValidation');
            }

        }

        //初始化，禁用验证（产品封闭期）
        $(function(){
            ccPeriodCloseIsValidate(false);
        });

        //如果产品类型是“芝麻开花”则显现封闭期
        $(function(){
            $("#ccProductType").combobox({
                onChange:function(){
                    var value = $("#ccProductType").combobox('getValue');
                    if(value == '2'){
                        $("#trPeriodClose").show();
                        ccPeriodCloseIsValidate(true);
                    }
                    else{
                        $("#trPeriodClose").hide();
                        ccPeriodCloseIsValidate(false);
                    }
                }
            })
        })
        /**
         * “芝麻开花”封闭期 -- end
         */




        /**
         * form表单提交 -- start
         */
        $(function(){
            $("#fmsb").click(function(){
                if(!$("#fm").form("validate")){//如果表单验证未通过，则不提交后台
                    $.messager.alert("系统提示","信息验证未通过，请修改");
                    return;
                }
                $("#fm").ajaxSubmit({
                    url:"${pageContext.request.contextPath}/wholeProcess2/saveWholeProcess2",
                    dataType:"json",
                    success:function(data){
                        if(data.status == 'success'){
                            $.messager.alert("系统提示","保存成功");
                        }
                        else{
                            $.messager.alert("系统提示","保存失败");
                        }
                    }
                });
            });
        });
        /**
         * form表单提交 -- end
         */

    </script>

</head>
<body>
    <form id="fm" method="post">
        <table border="0px" width="750px">
            <!------------->
            <!-- 所需流程 -->
            <!------------->
            <tr>
                <th colspan="2" width="150px">--->选择流程---></th>
                <td width="600px">
<%--                    <input class="easyui-checkbox" id="allAndNotAll" label="全选" labelPosition="after"><br>--%>
<%--                    <input class="easyui-checkbox" name="items" value="1" label="发标" labelPosition="after">--%>
<%--                    <input class="easyui-checkbox" name="items" value="2" label="发布产品、购买" labelPosition="after" labelWidth="150px"><br>--%>
<%--                    <input class="easyui-checkbox" name="items" value="3" label="满标" labelPosition="after">--%>
<%--                    <input class="easyui-checkbox" name="items" value="4" label="确认借贷" labelPosition="after">--%>
<%--                    <input class="easyui-checkbox" name="items" value="5" label="总部终审" labelPosition="after"><br>--%>
<%--                    <input class="easyui-checkbox" name="items" value="6" label="借新还旧" labelPosition="after">--%>
<%--                    <input class="easyui-checkbox" name="items" value="7" label="产品计息" labelPosition="after">--%>

                    <input type="checkbox" id="allAndNotAll">全选<br>
                    <input type="checkbox" name="items" value="1" >发标<br>
                    <input type="checkbox" name="items" value="2">发布产品、购买<br>
                    <input type="checkbox" name="items" value="3">满标<br>
                    <input type="checkbox" name="items" value="4">确认借贷<br>
                    <input type="checkbox" name="items" value="5">总部终审<br>
                    <input type="checkbox" name="items" value="6">借新还旧<br>
                    <input type="checkbox" name="items" value="7">产品计息<br>
                </td>
            </tr>
            <!------------->
            <!---- 发标 ---->
            <!------------->
            <tr id="1" style="display: none">
                <th>发标</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr>
                            <td width="150px">借款次数</td>
                            <td>
                                <input class="easyui-radiobutton" name="borrowTime" value="1" label="首次贷" labelPosition="after" checked="true">
                                <input class="easyui-radiobutton" name="borrowTime" value="2" label="二次贷" labelPosition="after">
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">个人借款人手机号</td>
                            <td>
<%--                                <input class="easyui-textbox" name="borrowerPhone" >--%>
                                <input class="easyui-textbox" id="borrowerPhone" name="borrowerPhone" data-options="required:true,validType:['mobile']">
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">借款类型</td>
                            <td>
                                <input  class="easyui-radiobutton" name="tenderType" value="24" label="翼车贷" labelPosition="after" checked="true" >
                                <br>
                                <input  class="easyui-radiobutton" name="tenderType" value="25" label="翼农贷" labelPosition="after" >
                                <input  class="easyui-radiobutton" name="tenderType" value="31" label="鑫农贷" labelPosition="after" >
                                <br>
                                <input  class="easyui-radiobutton" name="tenderType" value="26" label="翼商贷" labelPosition="after">
                                <input  class="easyui-radiobutton" name="tenderType" value="41" label="翼商短贷" labelPosition="after">
                                <br>
                                <input  class="easyui-radiobutton" name="tenderType" value="15" label="翼房贷活期1" labelPosition="after" labelWidth="120">
                                <input  class="easyui-radiobutton" name="tenderType" value="36" label="翼房贷活期2" labelPosition="after" labelWidth="120">
                                <input  class="easyui-radiobutton" name="tenderType" value="27" label="房抵标（定期）" labelPosition="after" labelWidth="120">
                                <br>
                                <input  class="easyui-radiobutton" name="tenderType" value="37" label="C+" labelPosition="after">
                                <input  class="easyui-radiobutton" name="tenderType" value="32" label="产业链标" labelPosition="after">
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">借款标题</td>
                            <td>
<%--                                <input name="tenderTitle" class="easyui-textbox" />--%>
                                <input class="easyui-textbox" id="tenderTitle" name="tenderTitle" data-options="required:true"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">借款金额</td>
                            <td>
<%--                                <input name="tenderAmount" class="easyui-textbox"/>--%>
                                <input class="easyui-textbox" id="tenderAmount" name="tenderAmount"  data-options="required:true,validType:['borrowMoney']"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">借款利率</td>
                            <td>
<%--                                <input name="tenderInterestrate" class="easyui-textbox" />--%>
                                <input id="tenderInterestrate" name="tenderInterestrate" class="easyui-textbox" data-options="required:true,validType:['interestrate']"/>
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">还款方式</td>
                            <td>
<%--                                <select id="ccRepaymentType" class="easyui-combobox" name="tenderRepaymentType" style="width:170px;" >--%>
                                <select id="ccRepaymentType" class="easyui-combobox" name="tenderRepaymentType" style="width:170px;" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="1">等额本金</option>
                                    <option value="2">等额本息</option>
                                    <option value="3">等额等息</option>
                                    <option value="7">等本等息</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">借款期限</td>
                            <td>
<%--                                <select id="ccTenderPhases" class="easyui-combobox" name="tenderPhases" style="width:170px;" >--%>
                                <select id="ccTenderPhases" class="easyui-combobox" name="tenderPhases" style="width:170px;" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="1">1月</option>
                                    <option value="2">2月</option>
                                </select>
                            </td>
                        </tr>
                        <tr id="trCreditProductType" style="display:none">
                            <td width="150px">C+产品类型</td>
                            <td>
                                <input id="creditProductType" name="tenderCreditProductType" class="easyui-textbox" readonly=”readonly” style="width:170px"/>
                            </td>
                        </tr>
                        <tr id="trCreditPromotion" style="display:none">
                            <td width="150px">C+增信方式</td>
                            <td>
                                <input id="creditPromotion" name="tenderCreditPromotion" class="easyui-textbox" readonly=”readonly” style="width:170px"/>
                            </td>
                        </tr>
                        <tr id="trPurposeOfBorrowing">
                            <td width="150px">首次贷借款目的</td>
                            <td>
<%--                                <select id="purposeOfBorrowing" name="tenderPurposeOfBorrowing" class="easyui-combobox" style="width:170px" >--%>
                                <select id="purposeOfBorrowing" name="tenderPurposeOfBorrowing" class="easyui-combobox" style="width:170px" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="1">翼房贷</option>
                                    <option value="2">翼企贷</option>
                                    <option value="3">翼车贷</option>
                                    <option value="4">翼农贷-个体商户类</option>
                                    <option value="5">翼农贷-运输类</option>
                                    <option value="6">产业集群-个人</option>
                                    <option value="7">产业集群-企业</option>
                                </select>
                            </td>
                        </tr>
                        <tr id="trSecType" style="display: none">
                            <td width="150px">二次贷类型：</td>
                            <td>
<%--                                <select id="secType" name="tenderSecType" class="easyui-combobox" style="width:170px">--%>
                                <select id="secType" name="tenderSecType" class="easyui-combobox" style="width:170px" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="27">农商AC01</option>
                                    <option value="28">农商AC02</option>
                                    <option value="36">农商AX01</option>
                                    <option value="29">农商EC01</option>
                                    <option value="30">农商EC02</option>
                                    <option value="11">农商A3</option>
                                    <option value="38">农商EX01</option>
                                </select>
                            </td>
                        </tr>
                        <tr id="trSecPurposeOfBorrowing" style="display: none">
                            <td>二次贷借款目的</td>
                            <td>
<%--                                <select id="secPurposeOfBorrowing" name="tenderSecPurposeOfBorrowing" class="easyui-combobox" style="width:200px">--%>
                                <select id="secPurposeOfBorrowing" name="tenderSecPurposeOfBorrowing" class="easyui-combobox" style="width:170px" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="I -农-A本地-复贷、EA、E">I -农-A本地-复贷、EA、E</option>
                                    <option value="本地-复贷I-商-A、EA">本地-复贷I-商-A、EA</option>
                                    <option value="本地-复贷I-商-E">本地-复贷I-商-E</option>
                                    <option value="本地复贷II（不分产品）">本地复贷II（不分产品）</option>
                                    <option value="鑫农贷-本地复贷">鑫农贷-本地复贷</option>
                                    <option value="异地-复贷I -农-A、EA、E">异地-复贷I -农-A、EA、E</option>
                                    <option value="异地-复贷I-商-A、EA">异地-复贷I-商-A、EA</option>
                                    <option value="异地-复贷I-商-E">异地-复贷I-商-E</option>
                                    <option value="异地复贷II（不分产品）">异地复贷II（不分产品）</option>
                                    <option value="默认">默认</option>
                                    <option value="异地借款人">异地借款人</option>
                                    <option value="鑫农贷-异地复贷">鑫农贷-异地复贷</option>
                                </select>
                            </td>
                        </tr>
                        <tr id="trJieXinHuanJiu" style="display: none">
                            <td>二次贷是否借新还旧</td>
                            <td>
<%--                                <select id="isJieXinHuanJiu" name="tenderIsJieXinHuanJiu" class="easyui-combobox" style="width:170px" >--%>
                                <select id="isJieXinHuanJiu" name="tenderIsJieXinHuanJiu" class="easyui-combobox" style="width:170px" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="1">是</option>
                                    <option value="2">否</option>
                                </select>
                            </td>
                        </tr>
                        <tr id="trEnterpriseName" style="display: none">
                            <td>产业集群企业名称</td>
                            <td>
<%--                                <input id="enterpriseName" name="tenderEnterpriseName" class="easyui-textbox" style="width:170px"/>--%>
                                <input id="enterpriseName" name="tenderEnterpriseName" class="easyui-textbox" style="width:170px" data-options="required:true"/>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>

            <!------------->
            <!-- 发布产品 -->
            <!------------->
            <tr id="2" style="display: none">
                <th>发布产品、购买</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr id="trProductTenderIdList" style="display: none">
                            <td width="150px">标id</td>
                            <td>
                                <input id="productTenderIdList" class="easyui-textbox" name="productTenderIdList">
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">产品类型</td>
                            <td>
                                <select id="ccProductType" class="easyui-combobox" name="productType" style="width:170px;"><!-- 此处有个BUG，不能关闭禁用验证 -->
<%--                                <select id="ccProductType" class="easyui-combobox" name="productType" style="width:170px;" data-options="required:true,validType:['selectValueRequired']">--%>
                                    <option value="-1">请选择</option>
                                    <option value="1">翼农计划</option>
                                    <option value="2">芝麻开花</option>
                                    <option value="3">私人定制</option>
                                    <option value="13">翼农计划+</option>
                                </select>
                            </td>
                        </tr>
                        <tr id="trPeriodClose" style="display:none">
                            <td width="150px">产品封闭期</td>
                            <td>
<%--                                <select id="ccPeriodClose" class="easyui-combobox" name="periodClose" style="width:170px;" >--%>
                                <select id="ccPeriodClose" class="easyui-combobox" name="periodClose" style="width:170px;" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="1">1天</option>
                                    <option value="15">15天</option>
                                    <option value="30">30天</option>
                                    <option value="60">60天</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">投资人手机号</td>
                            <td>
<%--                                <input id="investorPhone" class="easyui-textbox" name="investorPhone">--%>
                                <input id="investorPhone" class="easyui-textbox" name="investorPhone" data-options="required:true">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>


            <!------------->
            <!---- 满标 ---->
            <!------------->
            <tr id="3" style="display: none">
                <th>满标</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr id="trTenderFullTenderIdList" style="display: none">
                            <td width="150px">标id</td>
                            <td>
                                <input id="tenderFullTenderIdList" class="easyui-textbox" name="tenderFullTenderIdList" data-options="required:true">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>


            <!------------->
            <!-- 确认借贷 -->
            <!------------->
            <tr id="4" style="display: none">
                <th>确认借贷</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr id="trUserEnsureOwnTenderTenderIdList" style="display: none">
                            <td width="150px">标id</td>
                            <td>
                                <input id="userEnsureOwnTenderTenderIdList" class="easyui-textbox" name="userEnsureOwnTenderTenderIdList" data-options="required:true">
                            </td>
                        </tr>
                        <tr>
                            <td width="150px">确认借贷来源</td>
                            <td>
<%--                                <select id="loanSource" class="easyui-combobox" name="loanSource" style="width:170px;" >--%>
                                <select id="loanSource" class="easyui-combobox" name="tenderLoanSource" style="width:170px;" data-options="required:true,validType:['selectValueRequired']">
                                    <option value="-1">请选择</option>
                                    <option value="1">PC前台</option>
                                    <option value="2">APP</option>
                                </select>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>


            <!------------->
            <!-- 总部终审 -->
            <!------------->
            <tr id="5" style="display: none">
                <th>总部终审</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr id="trTenderFinalCheckTenderIdList" style="display: none">
                            <td width="150px">标id</td>
                            <td>
                                <input id="tenderFinalCheckTenderIdList" class="easyui-textbox" name="tenderFinalCheckTenderIdList" data-options="required:true">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>

            <!------------->
            <!-- 借新还旧 -->
            <!------------->
            <tr id="6" style="display: none">
                <th>借新还旧</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr id="trRepaySecParentTenderIdList" style="display: none">
                            <td width="150px">标id</td>
                            <td>
                                <input id="repaySecParentTenderIdList" class="easyui-textbox" name="repaySecParentTenderIdList" data-options="required:true">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>

            <!------------->
            <!-- 产品计息 -->
            <!------------->
            <tr id="7" style="display: none">
                <th>产品计息</th>
                <td colspan="2">
                    <table border="0px" width="600px">
                        <tr id="trProductId" style="display: none">
                            <td width="150px">产品id</td>
                            <td>
                                <input id="interestProductIdList" class="easyui-textbox" name="interestProductIdList" data-options="required:true">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>

            <tr>
                <td><br></td>
            </tr>

            <tr id="trSubmitButton" style="display: none">
                <td colspan="3" style="text-align: center;">
                    <a id="fmsb" class="easyui-linkbutton" iconCls="icon-ok">提交</a>
                </td>
            </tr>

        </table>
    </form>

    <%--多行文本框试试展示后台执行日志（暂时不会）--%>
<%--    <div>--%>
<%--        <input class="easyui-textbox" data-options="multiline:true" value="" style="width:1300px;height:200px">--%>
<%--    </div>--%>
</body>
</html>
